@include('Admin.public.head')
<body>
@include('Admin.public.menu')
<link rel="stylesheet" href="{{ URL::asset('js/admin/layui/css/layui.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/font-awesome.min.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/jquery.orgchart.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/style2.css') }}"/>
<link rel="stylesheet" href="{{ URL::asset('css/admin/team/style1.css') }}"/>
<style type="text/css">
	.team-item{margin-left:15px;margin-top:10px;}
	.orgchart .node .content{height:50%;}
</style>
<div class=" admin-content" id="app">
    {{ csrf_field() }}
    <div class="daohang">

    </div>

    <div class="admin-biaogelist">
        <div class="listbiaoti am-cf">
            <ul class="am-icon-flag on">团队谱系图</ul>
        </div>
        <div class="team-item">
            <form class="am-form-inline" role="form">
                <div class="am-form-group">
                    接点销售商账号 ：<input class="am-form-field" name="name" value="{{$data['name']}}" placeholder="输入销售商账号">
                </div>

                <button type="submit" class="am-btn am-btn-secondary">查询</button>
                <button type="submit" class="am-btn am-btn-success">重置</button>
            </form>
        </div>
        <div id="chart-container" style="height: 700px"></div>
    </div>
</div>
</body>
<!--团队谱js-->
<script src="{{ URL::asset('js/admin/team/jquery.orgchart.js') }}"></script>
{{--<!-- <script src="{{ URL::asset('js/admin/team/scripts.js') }}"></script> -->--}}

<script>
	var datascource = {
      'name': "{{$data['name']}}",
      'title': "{{$data['user_name']}}<br>{{$data['level_name']}}",
        // 'className': 'product-dept', //绿色
        'className': 'pipeline1', //棕色
      'children':{!! $data['children'] !!}
    };

    $('#chart-container').orgchart({
      'data' : datascource,
      'nodeContent': 'title'
    });

</script>
</html>